<template>
 <div>
     <img
    class="img"
    v-for="item in list"
    :key="item.id"
    v-src="item.picture"
  />
  <!-- {{list}} -->
  <!-- {{list.goods[0].picture}} -->
 </div>
</template>

<script>
import { onMounted, ref } from 'vue'
import { findGoods } from '@/api/home'
export default {
  setup () {
    const list = ref([])
    onMounted(() => {
      findGoods().then(({ result }) => {
        console.log(result)
        list.value = result[0].goods
      })
    })
    return { list }
  }
}
</script>

<style scoped lang='less'>
.img {
  width: 300px;
  height: 300px;
  background-color: pink;
  display: block;
  margin: 20px auto;
}
</style>
